// app.js

import utils from './utils/utils.js'
import http from './utils/http.js'
import dateFormate from './utils/dateFormate.js'

wx.utils = utils
wx.http = http
wx.dateFormate = dateFormate
App({
  token:wx.getStorageSync('token'),
  refreshToken:wx.getStorageSync('refreshToken'),
  // 存token的方法
  setToken(key, token) {
    // 将 token 记录在应用实例中   
   this[key] = token
   // 将 token 存入本地
   wx.setStorageSync(key, token)
 },
  globalData: {},
})
